package com.yiji.fintech.musfinance.common.exception;

import com.acooly.core.common.exception.BusinessException;
import com.acooly.core.common.facade.ResultCode;

/**
 * Created by ouwen@yiji.com} on 2017/9/18.
 */
public class ObjectParamFormatException extends BusinessException {

    private String requiredTypeOrFormat;

    public ObjectParamFormatException(String paramName, Object paramValue, String requiredTypeOrFormat) {
        super("参数" + paramName + "=" + paramValue + ",格式错误,需要的:" + requiredTypeOrFormat,
                ResultCode.PARAM_FORMAT_ERROR.getCode());
        this.requiredTypeOrFormat = requiredTypeOrFormat;
    }

    public String getRequiredTypeOrFormat() {
        return this.requiredTypeOrFormat;
    }

    public void setRequiredTypeOrFormat(String requiredTypeOrFormat) {
        this.requiredTypeOrFormat = requiredTypeOrFormat;
    }
}
